import pip
# from pip._internal.utils.misc import get_installed_distributions
from pkg_resources import get_distribution
from subprocess import call

for dist in get_distribution():
    call("pip3 install --upgrade " + dist.project_name, shell=True)
